//借款信心
import { $axios } from "../request.js";
import prefix from "../base.js";
export default {
    //预支生活费微信提交订单
  createOrderByLivingExpenses(data) {
      // console.log(`${prefix.jiekuan}/loan/submitLoan`);
      return $axios(`${prefix.jiekuan}/pay/createOrderByLivingExpenses`, data, "POST");
    },
    //提交借款信息
    submitLoan(data) {
        // console.log(`${prefix.jiekuan}/loan/submitLoan`);
        return $axios(`${prefix.jiekuan}/loan/submitLoan`, data, "POST");
    },
    //生成pdf /riderloan/startAgreement
    startAgreement(data) {
        return $axios(`${prefix.jiekuan}/loan/startAgreement`, data, "POST");
        // return $axios(`${prefix.jiekuan}/loan/startAgreement?ids=${data.ids}`, null, "GET");
    },
    //获取用户信息接口
    getUserinfo(data) {
        // console.log(`${prefix.jiekuan}/loan/submitLoan`);
        return $axios(`${prefix.jiekuan}/loan/getByOpenid?openid=${data.openid}`, null, "GET");
    },
    getSetOpenid(data) {
        return $axios(`${prefix.jiekuan}/loan/setOpenid?openid=${data.openid}&phone=${data.phone}`, null, "GET");
    },
    //根据站点获取负责人接口
    getCityGuaList(id) {
      return $axios(`${prefix.jiekuan}/loan/getCityGuaList?deptid=${id}`, null, "GET");
    },
    //根据站点获取担保人接口
    getGuaList(id) {
        return $axios(`${prefix.jiekuan}/loan/getGuaList?deptid=${id}`, null, "GET");
    },
    //获取借款详情
    getLoanById(id) {
        return $axios(`${prefix.jiekuan}/loan/getLoanById?loanid=${id}`, null, "GET");
    },
    //获取借款记录列表
    getLoanList(query) {
        return $axios(`${prefix.jiekuan}/loan/getLoanList?status=${query.status}&guaPhone=${query.guaPhone}`, null, "GET");
    },
    //获取借款记录列表
    getMySecurityList(query) {
      return $axios(`${prefix.jiekuan}/loan/getMySecurityList?openid=${query.openid}&phone=${query.phone}`, null, "GET");
    },
    //我的申请
    getMyLoanList(query) {
        return $axios(`${prefix.jiekuan}/loan/getMyLoanList?openid=${query.openid}&phone=${query.phone}`, null, "GET");
    },
    //借款担保接口
    securityLoan(data) {
        return $axios(`${prefix.jiekuan}/loan/securityLoan`, data, "POST");
    },
    //获取注册详情信息  /webrec/history1?deptId=100
    getHistory1(id,inductiontype) {
        return $axios(`${prefix.jiekuan}/webrec/history1?deptId=${id}&inductionType=${inductiontype}`, null, "GET");
    },
    //获取所有站点名称
    getListDept(){
        return $axios(`${prefix.jiekuan}/system/dept/listDept/0`, null, "GET");
    },
    // 预支生活费 - 订单查询
    queryOrderLoan(data){
      return $axios(`${prefix.jiekuan}/pay/queryOrderLoan`,data,'GET',true);
    },
}
